﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<FillCartridgeBBB.Models.Move>" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
function dropdown(sel) {
    var button = document.getElementById('go');
    button.click();
}

function createMov() {
    var op = document.getElementById('operation');
    op.value = "create";
    var button = document.getElementById('go');
    button.click();
}

function onError()
{
    alert ("Error");
}

</script> 
    <h2>Create</h2>

    <% 
    using(Ajax.BeginForm(new AjaxOptions{UpdateTargetId = "aj", OnFailure = "onError"}))
       {%>
           <div id = "aj">
           <%Html.RenderPartial("CreateMov", ViewData); %> 
        </div>           
    <% } %>

    <div>
        <%= Html.ActionLink("До списку", "List") %>
    </div>

</asp:Content>

